{% extends "base.html" %}

{% block content %}
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
    <h1 class="h2">修改密码</h1>
    <a href="{{ url_for('main.dashboard') }}" class="btn btn-secondary">返回</a>
</div>

<div class="row justify-content-center">
    <div class="col-md-6">
        <div class="card shadow-sm">
            <div class="card-body">
                <form method="POST">
                    {{ form.hidden_tag() }}
                    <div class="mb-3">
                        {{ form.old_password.label(class="form-label") }}
                        {{ form.old_password(class="form-control") }}
                    </div>
                    <div class="mb-3">
                        {{ form.new_password.label(class="form-label") }}
                        {{ form.new_password(class="form-control") }}
                        <div class="form-text">密码长度至少6位</div>
                    </div>
                    <div class="mb-3">
                        {{ form.confirm_password.label(class="form-label") }}
                        {{ form.confirm_password(class="form-control") }}
                    </div>
                    <button type="submit" class="btn btn-primary">修改密码</button>
                    <a href="{{ url_for('main.dashboard') }}" class="btn btn-secondary">取消</a>
                </form>
            </div>
        </div>
    </div>
</div>
{% endblock %}